#version 450

const vec2 Vertices[4] = vec2[4](
   vec2(-1.0f, -1.0f),
   vec2(1.0f, -1.0f),
   vec2(-1.0f, 1.0f),
   vec2(1.0f, 1.0f)
);

//输出UV坐标
layout (location = 0) out vec2 outUV;

void main()
{
	//绘制整个屏幕
    gl_Position = vec4(
        Vertices[gl_VertexIndex],
        1.0f //没有深度测试，随便写
        ,1.0f);

    //输出UV坐标
    outUV = Vertices[gl_VertexIndex] * 0.5f + 0.5f;
}